import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    list: JSON.parse(localStorage.getItem('list')) || [], 
  },
  getters: {

  },
  mutations: {
    // 首页svg数据  存到本地
    LIST(state, value) {
      console.log('value',state.list);
      value.forEach(element => {
        state.list.push(element,)
      });
      // state.list = value
      localStorage.setItem('list', JSON.stringify(state.list))
    },

  
  },
  actions: {
  },
  modules: {
  }
})
